<script>
	$(function(){
		$("#step1Form").validate({
			errorPlacement:function(error, element){
				$("<img src=\'/images/error.jpg\'>").prependTo(error);
				element.parent().children(".case-des").html('<{$languages.REQUIRED}>');


			},
			success:function(label){
				label.parent().parent().children(".case-des").html("<img src='/images/yes.gif'>");
			}
		});

				$(".submit").click(function(){
					if(!$("#step1Form").valid()){
						return false;
					}
					var options = {
						url:"/merchant/index/register-step",
						dataType:"json",
						type:"post",
						success:function(json){
							if(json.ask){
								toLink("/merchant/my-account/");
							}else{
								$(".error").remove();
								$.each(json.error,function(k,v){

									$("."+k).after('<span style="color:red" class="error">'+v+'</span>');
								});
							}
						}
					};
					$("#step1Form").ajaxSubmit(options);
				});
	});
</script>

	  <h4><{$languages['PLEASE_IMPROVE_MATERIAL']}></h4>
                <p class="bold"><{$languages['SERVICE_PROMPT']}></p>
                <div id="step" class="step-1">
                <ul>
                <li style="width:200px;">1: <{$languages['PERFECT_MATERIAL']}></li>
                <li style="width:100px">2: <{$languages['REGISTRATION_SUCCESSFUL']}></li>
                </ul>
                <div class="clearFloat"></div>
                </div>
                <div style="width:640px; margin:10px; background:#FAFAFA">
                <div class="top-1"></div>
                <div class="middle-1">
                <ul>
                <li><span class="bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User ID:&nbsp;&nbsp;</span> <{$customer.customer_id}></li>
                <li><span class="bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail:&nbsp;&nbsp;</span><{$customer.customer_email}></li>
                </ul>

                <ul class="userinfo">
				<form id="step1Form">
                <li><span class="width5"><span class="red">*</span><{$languages['FIRST_NAME']}>:</span><input type="text" class="input-width-1 customer_firstname required" name="firstName"/><span class="case-des"></span></li>
                <li><span class="width5"><span class="red">*</span><{$languages['LAST_NAME']}>:</span><input type="text" class="input-width-1 customer_lastname required" name="lastName"/><span class="case-des"></span></li>
                <li><span class="width5">
				<span class="red">*</span><{$languages['COUNTRY']}>:</span>
				<select name="country" class="input-width-1 cab_country_id required">
					<option value=""><{$languages['PLS_SELECT']}></option>
					<{foreach from=$countrys item=country}>
						<option value="<{$country.country_id}>"><{$country.en_name}></option>
					<{/foreach}>
				</select>
				<span class="case-des"></span></li>
                <li><span class="width5"><span class="red">*</span><{$languages['TEL']}>:</span><input type="text" class="input-width-1 customer_telephone required" name="phone"/><span class="case-des"></span></li>
                <li><span class="width5"><span class="red">*</span><{$languages['COMPANY']}>:</span><input type="text" class="input-width-1 customer_company_name required" name="company"/><span class="case-des"></span></li>
                <li><span class="width5"><span class="red">*</span><{$languages['CITY']}>:</span><input type="text" class="input-width-1 cab_city required" name="city" /><span class="case-des"></span></li>
                <li><span class="width5"><span class="red">*</span><{$languages['STATE_PROVICE']}>:</span><input type="text" class="input-width-1 cab_state required" name="state"/><span class="case-des"></span></li>
                <li><span class="width5"><span class="red">*</span><{$languages['POSTAL_CODE']}>:</span><input type="text" class="input-width-1 cab_postcode required" name="postalCode"/><span class="case-des"></span></li>
                <li><span class="width5"><span class="red">*</span><{$languages['ADDRESS_ONE']}>:</span><input type="text" class="input-width-1 cab_street_address1 required" style="width:400px" name="address1"/><span class="case-des"></span></li>
               <li><span class="width5"><span class="red">*</span><{$languages['ADDRESS_TWO']}>:</span><input type="text" class="input-width-1 cab_street_address2 required" style="width:400px" name="address2"/><span class="case-des"></span></li>
                </ul>  </form>
                </div>
                <div class="bottom-1"></div>
                </div>
                <p class="text-center"><span class="submit next-disabled"><{$languages['NEXT']}> &gt;</span></p>